home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
076-100
/
disk_096
/
warptext
/
warptext.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
7KB
|
154 lines
WarpText.doc WT 2.0 Bill Kelly
07/06/87
// // ////// ////// ////// //////// ////// ||// ////////
// // // // // // // // // // |// //
// / // ////// ////// ////// // ///// // //
// /// // // // // // // // // //| //
/// /// // // // // // // ////// //|| //
THANK YOU'S: (in alphabetical order)
Thanks to Anson Mah for writing the WarpText 'C' interface.
Without him, there wouldn't be one -- I don't speak C!
Thanks to Aaron Avery for taking my original unreleased WarpText routine,
which was fast but not fancy, and speeding it up immensely. This routine,
(after I sped it up even more by rearranging the font data), and Aaron's
cursor routine, are WarpText 2.0.
Thanks to Hayes C. Haugen who, by writing Blitz, reminded me of what
text on a computer like this *ought* to be like and so got me started
on WarpText.
Thanks to Leon Frankel (sorry if I got the name wrong -- that's what it
sounded like over the phone) for reporting a bug in the wi_Width handling
in the WarpText prerelease routines.
(Please see "BUGS:" for more information.)
If I forgot anyone -- sorry. Thanks to you, too!
COPYRIGHT NOTICE:
The WarpText code, and the name "WarpText,"
is Copyright 1987 by Bill W. Kelly.
DISTRIBUTION INFORMATION:
Feel free to distribute this code, complying with the following
restriction:
Since there are many files in this release of WarpText,
please distribute them in ARCed form so that no files get lost.
(If you need to UUEncode, please UUEncode the ARC file.)
Thanks!
NOTE: IF YOU ARE GOING TO MODIFY THE CODE, please make a little note
containing the date, your comments, and what the original code was.
Thanks.
USING WARPTEXT IN A PROGRAM:
That's why I wrote it!
If you are going to distribute the WarpText source code with your program
please also follow the directions under "DISTRIBUTION INFORMATION."
It would be neat, especially if you aren't distributing the source
with your program, if you could find a place somewhere in your program
(the "ABOUT" menu, for instance) to say something like,
"Using Bill Kelly's WarpText routines for speed!," however if you
don't seem to be able to do this... don't worry about it. I would
really appreciate it, though! Thanks!
PLEASE CONTACT ME BEFORE USING THIS CODE IN A COMMERCIAL PROGRAM!
(My address can be found at the end of this file.)
GENERAL INFORMATION:
The "Old Warp" routines use the WarpInfo structure to keep track
of which bitplane they're writing into, the current X and Y locations,
the TextFont data, etc.
STRUCTURE WarpInfo,0 ; ...the <I> denotes internal use.
APTR wi_TextFont ; Pointer to a TextFont structure.
APTR wi_BitMap ; Pointer to a BitMap structure.
WORD wi_WhichPlane ; Which bitplane to render into.
WORD wi_Left ; Left edge of 'window' in char loc's.
WORD wi_Top ; Top edge of 'window' in char loc's.
WORD wi_Width ; Width of 'window' in char loc's.
WORD wi_Height ; Height of 'window' in char loc's.
APTR wi_WindowTop ; <I> Address of top of 'window.'
APTR wi_CurLine ; <I> Address of start of current line.
APTR wi_LastLine ; <I> Address of start of last line.
WORD wi_CurX ; <I> Current X position.
WORD wi_LastX ; <I> Maximum X position on a line.
WORD wi_BPMod ; <I> # total possible chars on a line in bp
WORD wi_Modulo ; <I> Add this to get to next line.
LABEL wi_SIZE
Call the InitWarpInfo routine before calling any of the other "Old Warp"
routines. The WarpInfo structure you pass InitWarpInfo must be partially
initialized before calling InitWarpInfo. InitWarpInfo prepares
the parts WarpInfo structure marked with "<I>" so that the WarpInfo
structure can be used with GetXY, GotoXY, and WarpText.
The "New Warp" routines use NewWarpInfo structure. It's a lot smaller
than WarpInfo because the new routines have sacrificed features for speed.
STRUCTURE NewWarpInfo,0
WORD nwi_XLoc ; Current X position in char. loc's.
WORD nwi_YLoc ; Current Y position in char. loc's.
APTR nwi_BitPlane ; Address of bitplane to render text into.
APTR nwi_FontData ; Address of 2048 byte array for font data.
LABEL nwi_SIZE
Call the SetupFont routine before calling any of the other "New Warp"
routines. SetupFont unpacks the font passed to it into the 2048 byte
array, the address of which is kept in nwi_FontData. You must allocate
this 2048 byte array and store its address into nwi_FontData before
calling SetupFont. Pass the pointer to an open font to SetupFont on
the stack. The 2048 byte array does not have to be in CHIP ram because
the routines do not use the blitter. After calling SetupFont, the
NewWarpInfo structure can be used with NewWarp and XORCursor.
Please see the file "WarpText.asm" for more information about each
routine.
BUGS:
Known Bugs: Fixed:
----------- ------
WarpText writes to two more columns per line /
than it should. If you specify 10 for wi_Width \/ Yes.
you will get 12 characters per line.
_
If WarpText encounters a character that has not |\ | / \
been defined in the font it's using it will not | \| \_/ Not yet.
output the empty-box character. A garbage
character-pattern will appear.
BUG REPORTS:
I would really appreciate hearing about any problems you find in
my code! Please don't hesitate to drop me a line or send me mail
if you have any suggestions, questions, or comments. I welcome
your input.
Enjoy,
Bill Kelly.
MY ADDRESS:
NAME: Bill W. Kelly
UUCP: {hplabs!hp-sdd, sdcsvax, ihnp4}!crash!pnet01!billk
ARPA: crash!pnet01!billk@nosc
INET: billk@pnet01.CTS.COM | For UUCP, don't do just pnet01!billk;
USPS: 2507 Caminito La Paz | please include the crash!pnet01!billk.
La Jolla, CA 92037 | Thanks!
FONE: (619) 454-1307
* --------------------- *
* End of "WarpText.doc" *
* --------------------- *